import re
with open('temp.txt', 'r', encoding='utf-8') as f:
    text = f.read()
    print(text)

with open("temp.txt","w") as f:
  f.write("this is a kid")